//
//  TroopStyle.hpp
//  fingeradvanture
//
//  Created by shuaibincheng on 16/5/18.
//
//

#ifndef TroopStyle_hpp
#define TroopStyle_hpp

#include "MonsterDen.hpp"

enum TroopStyleType
{
    TYPE_LINEONETYPESTYLE,
    TYPE_LINETWOSTYLESSTYLE,
    TYPE_CROSSTWOSTYLESSTYLE,
    TYPE_CIRCLE
};

class TroopStyle
{
protected:
    int numOfMonsters;   //风格中包含的怪物个数
    int remaining;
public:
    TroopStyle(int num){ numOfMonsters = num; remaining = num;}
    MonsterType nextMemberType()
    {
        --remaining;
        return next();
    }
    bool hasNextMember()
    {
        if(remaining == 0)
            return false;
        else
            return true;
    }
    void reset(){remaining = numOfMonsters;}
protected:
    virtual MonsterType next() { return MONSTER_UNKNOWN; }
    
public:
    static TroopStyle *getTroopStyleByType(TroopStyleType type, int num);
};

#endif /* TroopStyle_hpp */
